package com.ruicar.afs.cloud.manage.api.feign.repayment;

import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.manage.api.dto.ManageRepaymentDateChangeDTO;
import com.ruicar.afs.cloud.manage.api.dto.OverpaymentDifferenceDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author chuke
 * @create 2020/7/6 11:18
 */
@FeignClient(name = "repaymentDateChange",url = "${com.greatwall.services.manage.url}")
public interface RepaymentDateChangeService {
    /**
     * 查询还款变更表的记录
     */
    @ApiOperation(value = "查询变更表中是否存在记录")
    @PostMapping(value = "repaymentChange/findPoundageByContractNo")
    IResponse<ManageRepaymentDateChangeDTO> repaymentChange(@RequestBody ManageRepaymentDateChangeDTO dto, @RequestHeader Map<String, String> heards);

    /**
     * 查询还款变更表的记录
     */
    @ApiOperation(value = "查询溢缴款、差额信息")
    @PostMapping(value = "contractClose/findByIdDetails")
    IResponse<OverpaymentDifferenceDTO> queryOverpaymentOrDifference(@RequestParam("contractNo") String contractNo, @RequestHeader Map<String, String> heards);

    /**
     * 查询联系方式变更表中合同的处理状态
     * @param contractNo
     * @param heards
     * @return
     */
    @ApiOperation(value = "联系方式变更表状态查询")
    @PostMapping(value = "processStatus/contactStatus")
    IResponse<OverpaymentDifferenceDTO> queryContactStatus(@RequestParam("contractNo") String contractNo, @RequestHeader Map<String, String> heards);

}
